class Solution {
public:
    bool isPalindrome(string s) {
        string tmp;
        for (int i = 0; i < s.size(); i++)
        {
            if ((s[i] >= 48 && s[i] <= 57) || (s[i] >= 97 && s[i] <= 122)) 
            {
                tmp.push_back(s[i]);
            }
            else if (s[i] >= 65 && s[i] <= 90) 
            {
                tmp.push_back(s[i] + 32);  
            }
        }
        for (int i = 0; i < tmp.size()/2; i++)
        {
            if (tmp[i] != tmp[tmp.size() - i - 1])
            {
                return false;
            }
        }
        return true;
    }
};
